package cn.stylefeng.guns.modular.system.mapper;

import cn.stylefeng.guns.base.pojo.node.ZTreeNode;
import cn.stylefeng.guns.modular.system.entity.Color;
import cn.stylefeng.guns.modular.system.model.params.ColorParam;
import cn.stylefeng.guns.modular.system.model.result.ColorResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ZhangJun
 * @since 2019-06-27
 */
public interface ColorMapper extends BaseMapper<Color> {

    /**
     * 获取列表
     *
     * @author ZhangJun
     * @Date 2019-06-27
     */
    List<ColorResult> customList(@Param("paramCondition") ColorParam paramCondition);

    /**
     * 获取map列表
     *
     * @author ZhangJun
     * @Date 2019-06-27
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") ColorParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author ZhangJun
     * @Date 2019-06-27
     */
    Page<ColorResult> customPageList(@Param("page") Page page, @Param("paramCondition") ColorParam paramCondition);

    /**
     * 获取分页map列表
     *
     * @author ZhangJun
     * @Date 2019-06-27
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") ColorParam paramCondition);

    /**
     * 树查找
     *
     * @author ZhangJun
     * @Date 2019-06-27
     */
    List<ZTreeNode> tree();

    /**
     * 根据id获得信息，以及上级的名称
     *
     * @author ZhangJun
     * @Date 2019-06-27
     */
    Color getById(@Param("id") int id);

    List<Color> getColor();

    List<Color> getNumber();

    List<Color> getMaterial();

    Color getColorById(@Param("id") Long id);

    Color getNumberById(@Param("id") Long id);
}
